
cd "/Users/ecconnors/OneDrive - University of South Carolina/Research/Projects/Polarization/POQ Final"

******************************************************************************
* Study 1 (Prolific, N=920)
******************************************************************************

*load data
use "Study1.dta", clear

*demographics
*democrat (1=democrat, 0=republican)
tab democrat
*strength (1=strong, 0=weak)
tab strength
*ideology (1=extremely liberal -> 7=extremely conservative)
sum ideology
*woman (2=woman, 1=man, 0=other)
tab woman
*white (1=white, 0=non-white)
tab white
*age
sum age
*education (1=did not complete high school -> 6=graduate/professional degree)
tab education

*fake good vs. fake bad
sum fakegood_affectivepolarization
sum fakebad_affectivepolarization
*fake good vs. fake bad, inparty
sum fakegood_inpartyfeeling
sum fakebad_inpartyfeeling
*fake good vs. fake bad, outparty
sum fakegood_outpartyfeeling
sum fakebad_outpartyfeeling
*fake good vs. fake bad, democrats
sum fakegood_affectivepolarization if democrat == 1
sum fakebad_affectivepolarization if democrat == 1
*fake good vs. fake bad, republicans
sum fakegood_affectivepolarization if democrat == 0
sum fakebad_affectivepolarization if democrat == 0

*supplementary material F: self-monitoring alpha
alpha sm1 sm2 sm3
*supplementary material F: self-monitoring model (higher values = more 
*self-monitoring)
reg sm democrat strength i.ideology white ib2.woman age education, robust

******************************************************************************
* Study 2 (Prolific, N=973)
******************************************************************************

*load data
use "Study2.dta", clear

*demographics
*democrat (1=democrat, 0=republican)
tab democrat
*strength (1=weak, 2=strong)
tab strength
*ideology (1=extremely liberal -> 7=extremely conservative)
sum ideology
*woman (2=woman, 1=man, 1=neither)
tab woman
*white (1=white, 0=non-white)
tab white
*age
sum age
*education (1=did not complete high school -> 6=graduate/professional degree)
tab education

*study 2a: reactions
*"have you been in this situation before?" (1=yes, 2=no, 3=can't remember)
tab situation
*"pretended I agreed with them" rate 
tab pretend
*"tried to fit in" rate
tab fitin
*morphing rate (pretended + fit in)
tab morph
*morphing by condition (1=increase, 0=decrease)
logit morph increase_decrease
*supplementary material: table B1 (predicting morphing)
logit morph sm
logit morph sm democrat strength i.ideology white ib1.woman age education
*"agreed with whoever was speaking" rate
tab agreed
*agree rate compared to pretend, fit in, and morphing rate
ttest pretend == agreed
ttest fitin == agreed
ttest morph == agreed
*agree rate by condition
tab agreed if increase_decrease == 1
tab agreed if increase_decrease == 0
logit agreed increase_decrease
*within desirable condition: agree versus morphing rate
preserve
keep if increase_decrease == 1
ttest morph == agreed
restore

*study 2b: feeling thermometers
*supplementary material: table B2 (polarization responses by treatment)
mean affectivepolarization if polarization_treatments==1
mean affectivepolarization if polarization_treatments==0
mean affectivepolarization if polarization_treatments==2
reg affectivepolarization increase_control, robust
reg affectivepolarization decrease_control, robust
*supplementary material: table B3 (polarization responses by treatment
*and self-monitoring)
*self-monitoring * undesirable treatment
reg affectivepolarization i.decrease_control##c.sm, robust
*self-monitoring * desirable treatment
reg affectivepolarization i.increase_control##c.sm, robust
*self-monitoring * desirable treatment, just outparty
reg outpartyfeeling i.increase_control##c.sm, robust
*self-monitoring * desirable treatment, just inparty
reg inpartyfeeling i.increase_control##c.sm, robust
*self-monitoring * desirable treatment, just democrats
preserve
keep if democrat == 1
reg affectivepolarization i.increase_control##c.sm, robust
restore
*self-monitoring * desirable treatment, just republicans
preserve
keep if democrat == 0
reg affectivepolarization i.increase_control##c.sm, robust
restore
*self-monitoring * desirable treatment, with controls
reg affectivepolarization i.increase_control##c.sm democrat strength ///
i.ideology white ib1.woman age education, robust
*supplementary material: table B4 (modeling self-monitoring as non-linear)
reg affectivepolarization i.increase_control##i.sm_quartiles, robust

*supplementary material F: self-monitoring alpha
alpha sm1 sm2 sm3
*supplementary material F: self-monitoring model (higher values = more 
*self-monitoring)
reg sm democrat strength i.ideology white ib2.woman age education, robust

******************************************************************************
* Study 3 (Mturk, N=520)
******************************************************************************

*load data
use "Study3.dta", clear

*demographics
*democrat (1=democrat, 0=republican)
tab democrat
*strength (2=weak, 3=strong)
tab strength
*ideology (extremely liberal -> extremely conservative)
sum ideology
*woman (1=woman, 0=man)
tab woman
*white (1=white, 0=non-white)
tab white
*age
sum age
*education (1=did not complete high school -> 6=graduate/professional degree)
tab education

*supplementary material: table C1 (polarization responses by treatment: 
*1=control, 2=public, 3=private)
mean thermometer if treatment == 2
mean thermometer if treatment == 1
mean thermometer if treatment == 3
ttest thermometer, by(public)
ttest thermometer, by(private)
*supplementary material: table C2 (polarization responses by treatment and
*self-monitoring)
*self-monitoring * public treatment
reg thermometer i.public##c.sm, robust
*self-monitoring * private treatment
reg thermometer i.private##c.sm, robust
margins, dydx(private) by(sm)
*self-monitoring * private treatment, just outparty
reg outparty_therm i.private##c.sm, robust
*self-monitoring * private treatment, just inparty
reg inparty_therm i.private##c.sm, robust
*self-monitoring * private treatment, just democrats
preserve
keep if democrat == 1
reg thermometer i.private##c.sm, robust
restore
*self-monitoring * private treatment, just republicans
preserve
keep if democrat == 0
reg thermometer i.private##c.sm, robust
restore
*self-monitoring * private treatment, with controls
reg thermometer i.private##c.sm democrat strength i.ideol white woman ///
age education, robust
*supplementary material: table C3 (modeling self-monitoring as non-linear)
reg thermometer i.private##i.sm_quartiles, robust

*supplementary material F: self-monitoring alpha
alpha sm1b sm2b sm3b
*supplementary material F: self-monitoring model (higher values = more 
*self-monitoring)
reg sm democrat strength i.ideology white ib1.woman age education, robust

******************************************************************************
* Study 4 (AmeriSpeak, N=1895)
******************************************************************************

*load data
use "Study4.dta", clear

*demographics
*democrat (1=democrat, 0=republican)
tab democrat
*strength (2=weak, 3=strong)
tab strength
*ideology (extremely liberal -> extremely conservative)
sum ideology
*woman (1=woman, 0=man)
tab woman
*white (1=white, 0=non-white)
tab white
*age
tab AGE4
*education (no formal education -> professional or doctorate degree)
tab EDUC

*supplementary material: table D1 (polarization responses by treatment: 
*1=control, 2=public, 3=private)
mean thermometer if treatment == 2
mean thermometer if treatment == 1
mean thermometer if treatment == 3
mean trust if treatment==2
mean trust if treatment==1
mean trust if treatment==3
ttest thermometer, by(public)
ttest thermometer, by(private)
ttest trust, by(public)
ttest trust, by(private)
*supplementary material: table D2 (polarization responses by treatment and
*self-monitoring - feeling thermometers)
*self-monitoring * public treatment
reg thermometer i.public##c.sm, robust
*self-monitoring * private treatment
reg thermometer i.private##c.sm, robust
margins, dydx(private) by(sm)
*self-monitoring * private treatment, just outparty
reg outparty_therm i.private##c.sm, robust
*self-monitoring * private treatment, just inparty
reg inparty_therm i.private##c.sm, robust
*self-monitoring * private treatment, just democrats
preserve
keep if democrat == 1
reg thermometer i.private##c.sm, robust
restore
*self-monitoring * private treatment, just republicans
preserve
keep if democrat == 0
reg thermometer i.private##c.sm, robust
restore
*self-monitoring * private treatment, with controls
reg thermometer i.private##c.sm democrat strength i.ideology white woman ///
AGE7 EDUC, robust
*supplementary material: table D3 (polarization responses by treatment and
*self-monitoring - trust)
*self-monitoring * public treatment
reg trust i.public##c.sm, robust
*self-monitoring * private treatment
reg trust i.private##c.sm, robust
margins, dydx(private) by(sm)
*self-monitoring * private treatment, just outparty
reg outparty_trust i.private##c.sm, robust
*self-monitoring * private treatment, just inparty
reg inparty_trust i.private##c.sm, robust
*self-monitoring * private treatment, just democrats
preserve
keep if democrat == 1
reg trust i.private##c.sm, robust
restore
*self-monitoring * private treatment, just republicans
preserve
keep if democrat == 0
reg trust i.private##c.sm, robust
restore
*self-monitoring * private treatment, with controls
reg trust i.private##c.sm democrat strength i.ideology white woman ///
AGE7 EDUC, robust
*supplementary material: table D4 (modeling self-monitoring as non-linear)
reg thermometer i.private##i.sm_quartiles, robust
reg trust i.private##i.sm_quartiles, robust

*supplementary material F: self-monitoring alpha
alpha Q1 Q2 Q3
*supplementary material F: self-monitoring model (higher values = more 
*self-monitoring)
reg sm democrat strength i.ideology white woman AGE7 EDUC, robust

******************************************************************************
* Post-Hoc Manipulation Check (Prolific, N=450)
******************************************************************************

*load data
use "Check.dta", clear

*demographics
*democrat (1=democrat, 0=republican)
tab democrat
*strength (2=weak, 3=strong)
tab strength
*ideology (extremely liberal -> extremely conservative)
sum ideology
*woman (1=woman, 0=man)
tab woman
*white (1=white, 0=non-white)
tab white
*age
sum age
*education (1=did not complete high school -> 6=graduate/professional degree)
tab education

*supplementary material: table E1 (privacy responses by treatment)
reg privacy1 private, robust
reg privacy2 private, robust
reg privacy3 private, robust
reg privacy1 public, robust
reg privacy2 public, robust
reg privacy3 public, robust
*privacy perceptions (privacy1 + privacy2, standardized and merged)
reg privacy private, robust
*privacy concerns
sum privacy3

*supplementary material: table E2 (accountability responses by treatment)
reg accountability1 private, robust
reg accountability2 private, robust
reg accountability1 public, robust
reg accountability2 public, robust
